/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ships.core.models;

import ships.core.AbstractDataBuffer;
import ships.core.DeviceDataBuffer;
import ships.core.HostDataBuffer;

/**
 *
 * @author fqhuy
 */
public abstract class MemoryModel {

    protected MemoryModel() {
    }

    public abstract <E extends Number> Object allocate(int size, Class<E> cls);

    public <E extends Number> Object allocate(int width, int height, Class<E> cls) {
        throw new UnsupportedOperationException();
    }

    public <E extends Number> Object allocate(int width, int height, int depth, Class<E> cls) {
        throw new UnsupportedOperationException();
    }

    public static <E extends Number> void transfer(HostDataBuffer<E> from, DeviceDataBuffer<E> to) {
    }

    public static <E extends Number> void transfer(DeviceDataBuffer<E> from, HostDataBuffer<E> to) {
    }

    public static <E extends Number> AbstractDataBuffer<E> createDataBuffer(int size) {
        throw new UnsupportedOperationException();

    }
}
